/**
 * problem_017.c
 * Copyright (C) 2011-03-19 - xrose
 */
#include <stdio.h>
int main (int argc, char *argv[])
{
    int count =0;
    char c;
    FILE * pFile;
    pFile=fopen ("data","r");
    if (pFile==NULL)
    {
        perror ("Error opening file");
    }
    else
    {
        do
        {
            c = fgetc (pFile);
            if (((c >= 'A')&&(c <= 'Z'))||((c >= 'a')&&(c <= 'z'))) count++;
        } while (c != EOF);
        fclose (pFile);
        printf ("The file contains %d character.\n",count);
    }

    return 0;
}
